<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>${_front_title}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/static/favicon.ico"/>
	<link rel="stylesheet" href="/static/front/fonts/iconfont.css">
	<link rel="stylesheet" href="${_front_css}/base_new.css">
    <link rel="stylesheet" href="${_front_css}/library.css">
    <link rel="stylesheet" href="${_front_css}/style.css">
    <script src="${_front_js}/jquery-1.11.1.min.js" type="text/javascript" ></script>
    <script src="${_front_js}/js.js" type="text/javascript" ></script>
    <script src="${_front_js}/jquery-qrcode-0.14.0.js" type="text/javascript" ></script>
    <script src="/static/front/zeroclipboard-master/dist/ZeroClipboard.js" type="text/javascript" ></script>
   <style type="text/css">
			.btn-submit {
				cursor: pointer;
				padding: 10px 45px;
				width: 175px;
				height: 35px;
				margin-left: 3px;
				border: #4db0c2 1px solid;
				background: #5dc0d2;
				color: #fff;
				border-radius: 3px;
				-webkit-border-radius: 3px;
				-moz-border-radius: 3px;
				-ms-border-radius: 3px;
				text-align: center;
				line-height: 35px;
			}
			
			div#code {
			    width: 150px;
			    height: 150px;
			    }
		    div#tip {
			    margin: auto;
		     	}
			.spancolor{color:#f06a11;}
			
			input.copy_url {
			    width: 90px;
			    height: 34px;
			    background-color: #26B99A;
			    border: none;
			    color: #fcfcfc;
			    font-family: "Microsoft Yahei";
			    margin-left: 20px;
				}
		</style>
	</head>

	<body>

		<!-- 头部 结束 -->
		<div class="content">
			<#include "../base/top.ftl" />
			
			<div id="myInvestmentMain" class="cnt clearfix layoutMain">
				<#include "base1.ftl" />
				<div>

					<div class="investment fr" style="margin-left:30px;">
						<h2  style="width:978px;">邀请好友</h2>
						<div style="width:630px;padding-bottom:17px;float:left;">
							<p style="font-size:15px;line-height:30px;margin-bottom:10px;">
								1、被邀请者注册时，在注册页面的<span class="spancolor">【邀请码】</span> 中输入邀请者手机号
							</p>
							<p style="font-size:15px;line-height:30px;margin-bottom:10px;">
								2、好友成功注册后，您将成为该好友的<span class="spancolor">推荐人</span> 
							</p>
							<p style="font-size:15px;line-height:30px;margin-bottom:10px;">
								3、在<span class="spancolor">“推荐返利”</span> 活动期间，当其邀请的好友首次达到相应的<span class="spancolor">会员等级</span> 后
							</p>
							 <p style="font-size:15px;line-height:30px;margin-bottom:10px; padding-left:25px;">
								邀请人可获得现金奖励，累计计算。推荐一位朋友最高可获得<span class="spancolor">5000元</span>的返现  
							</p>
						</div>
				
						<div style="width:250px;padding-bottom:17px;float:right;">	
					
							<div id="code" ></div>
							<div id="tip"><h4 style="height: 44px; color:#383838;font-weight: bold;font-size: 11px;margin-left: 28px;">我的邀请二维码</h4></div>
						</div>
						
						<div class="clear"></div>
					</div>
					
				   <div class="investment fr">
						<h2>邀请链接</h2>
						<div style="width:978px;padding-bottom:17px;">
					     	<p style="font-size:15px;line-height:30px;margin-bottom:10px;">
					     	<span id="inviteUrl" class="spancolor"  style="color:#3C9BF3"></span>
					     	<input  type="button" value="复制链接" class="copy_url" id ="copy_url"  style="cursor:pointer">
							</p>
						<!--	<p style="font-size:15px;line-height:30px;margin-bottom:10px;">
							   <span class="btn-submit" id="qrButton">获取二维码</span>
							</p>-->
						</div>
					</div>
					<div class="account_box fr">
						<h3 class="clear">
					<span class="fl">我的邀请</span>
			         	</h3>

						<table  style="width:978px;">
							<thead>
								<tr>
									<td class="td1">序号</td>
									<td class="td1">下线用户</td>
									<td class="td2">注册时间</td>
									<td>是否开户</td>
								</tr>
							</thead>
							<tbody>

								<#if (invoteInfo?exists)&& ((invoteInfo.pageList)?size>0)>
									<#list invoteInfo.pageList as model>
										<tr>
											<td class="td1">${model_index+1}</td>
											<td class="td1">${model.username}</td>
											<td class="td2">${(model.registerTime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
											<td class="td3 yrz_on">
												<#if model.fuionAccount=='Y'>
													已开户
													<#else>
														未开户
												</#if>
											</td>
										</tr>
									</#list>
								</#if>
							</tbody>
						</table>
						<!-- 分页组件 -->
						<#if (invoteInfo??) & (invoteInfo.pageList?size>0)>
							<div class="tcdPageCode"></div>
						</#if>
					</div>
				</div>
			</div>
			<div id="footer">
				<div class="content">
					<#include "../base/foot.ftl" />
				</div>
			</div>
		</div>
		<script type="text/javascript" src="${_front_js}/jquery.page.js"></script>
		<script type="text/javascript" src="${_front_js}/layer/layer.js"></script>
		<script type="text/javascript" src="${_front_js}/layer/extend/layer.ext.js"></script>
		<script>
		$().ready(function(){
			var inviteUrl = window.location.host+"/wx_xbd/register-phone.html?inviteCode="+ <#if parentUser?exists && parentUser.phone??>${parentUser.phone}</#if>;
			var invitePc = window.location.host+"/register?invitePhone="+ <#if parentUser?exists && parentUser.phone??>${parentUser.phone}</#if>;
			$("#inviteUrl").text(invitePc);
		    $('#code').qrcode({ 
				    width: 140,
				    height:140,
				    text: inviteUrl
			});
			
			
			
			
			
			ZeroClipboard.config( { swfPath: '/static/front/zeroclipboard-master/dist/ZeroClipboard.swf' } );
			
			var clip = new ZeroClipboard( document.getElementById("copy_url") );
			clip.on("ready", function(){ });
			clip.on("copy", function(e){
    				e.clipboardData.setData("text/plain", $("#inviteUrl").text())
    				layer.alert("邀请链接："+$("#inviteUrl").text()+"已经复制！");
			})
		})
		
		$(".tcdPageCode").createPage({
		    pageCount:<#if (invoteInfo?? & invoteInfo.pages?exists)>
		    			${invoteInfo.pages}
					  </#if>,//总页数
		    current:<#if (invoteInfo?? & invoteInfo.index?exists)>
		    			${invoteInfo.index}
					  </#if>,
		    backFn:function(index){
		    	 window.location.href="/account/invite?index="+index;
		    }
		});
		$("#qrButton").click(function(){
		     var inviteUrl = window.location.host+"/wx_xbd/register-phone.html?inviteCode="+ <#if parentUser?exists && parentUser.phone??>${parentUser.phone}</#if>;
             $('#code').qrcode({ 
				    width: 160,
				    height:160,
				    text: inviteUrl,
				    render:"table"
				});
            });
            
       
       
</script>


</body>
</html>